import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);
import persist from 'vuex-persistedstate'
export default new Vuex.Store({
  state: {
    id: '',
    userName: '',
    productID:[],
    inputvalue:''
  },
  mutations: {
    user(state, value) {
      state.userName = value
    },
    detailsPage(state,value){
        state.productID=value
    },
    id(state,id){
        state.id=id
    },
    inputvalue(state,value){
        state.inputvalue=value
    }
  },
  actions: {},
  modules: {},
  plugins: [
    new persist({
      storage: window.localStorage,
    }),
  ],
});
